#!/usr/bin/env python
# -*- coding:utf-8 -*-

"""
@author zyx
@since 2022/2/13 16:48
@file: c01_同步执行.py
"""

import requests
import time

start = time.time()  # 程序执行开始的时间
urls = ['http://127.0.0.1:5000/bobo',
        'http://127.0.0.1:5000/tom',
        'http://127.0.0.1:5000/jay']


def get_request(url):
    page_text = requests.get(url=url).text
    print(len(page_text))


for url in urls:
    # 发起了三次请求
    get_request(url)
print('总耗时：', time.time() - start)  # 程序运行的总耗时
